# Contributor: Robert Sacks <robert@sacks.email>
# Maintainer: Robert Sacks <robert@sacks.email>
pkgname=streamlink
pkgver=1.4.1
pkgrel=0
pkgdesc="CLI for extracting streams from various websites to a video player of your choosing"
url="https://streamlink.github.io/"
arch="noarch"
license="BSD-2-Clause"
depends="python3 py3-pycryptodome py3-pycountry py3-requests py3-pysocks
	py3-websocket-client py3-isodate rtmpdump"
makedepends="py3-setuptools py3-sphinx py3-recommonmark"
checkdepends="py3-pytest py3-pytest-cov py3-codecov py3-coverage py3-freezegun
	py3-requests-mock py3-mock"
subpackages="$pkgname-doc"
source="streamlink-$pkgver.tar.gz::https://github.com/streamlink/streamlink/archive/$pkgver.tar.gz"

build() {
	export STREAMLINK_USE_PYCOUNTRY=1
	python3 setup.py build
	python3 setup.py build_sphinx -b man
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	install -Dm644 build/sphinx/man/streamlink.1 \
		"$pkgdir"/usr/share/man/man1/streamlink.1
}

sha512sums="45591cc026f5582020ce0541083baeace58f79d7906a7fbd031d412d8558f51ff80042aadeb7e25fb99ff528e2dffcef4df08ddf124e3ea8a3c9b9d947bed257  streamlink-1.4.1.tar.gz"
